package com.campus.service.impl;

import com.campus.service.StudentService;
import com.campus.dao.StudentDao;
import com.campus.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @desc:
 * @author: Tournesol234
 * @date: 2024/11/22 14.41
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;

    @Override
    public int createStudent(Student student) {
        return studentDao.createStudent(student);
    }

    @Override
    public int updateStudent(int id, Student student) {
        return studentDao.updateStudent(id, student);
    }

    @Override
    public int deleteStudent(int id) {
        return studentDao.deleteStudent(id);
    }

    @Override
    public Student getStudentById(int id) {
        return studentDao.getStudentById(id);
    }

    @Override
    public List<Student> getAllStudents() {
        return studentDao.getAllStudents();
    }

    @Override
    public int approveStudent(int id) {
        return studentDao.approveStudent(id);
    }

    @Override
    public int batchApproveStudents(List<Integer> studentIds) {
        return studentDao.batchApproveStudents(studentIds);
    }

    @Override
    public int batchCreateStudents(List<Student> students) {
        return studentDao.batchCreateStudents(students);
    }
}
